package com.gxar.quick.ar.server.db.model;

import lombok.Getter;
import lombok.NoArgsConstructor;
import lombok.Setter;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.Table;
import java.util.Date;

/**
 * @author linsy
 * @version 1.0
 * @created 2023/11/3 11:49
 */
@Entity
@Getter
@Setter
@NoArgsConstructor
@Table(name = "order_product")
public class OrderProductEntity {
    /**
     * 主键id
     */
    @Id
    @GeneratedValue(strategy = GenerationType.IDENTITY)
    private Long id;
    /**
     * 订单id
     */
    @Column(nullable = false)
    private Long orderId;
    /**
     * 产品id
     */
    @Column(nullable = false)
    private Long productId;
    /**
     * 产品类型
     * {@link com.gxar.quick.ar.server.base.common.enums.order.OrderProductTypeEnum}
     */
    private Integer type;
    /**
     * 产品属性
     * {@link com.gxar.quick.ar.server.base.common.enums.order.OrderPropertyEnum}
     */
    @Column(nullable = false)
    private Integer property;
    /**
     * 产品属性的值
     */
    @Column(nullable = false)
    private Integer propValue;
    /**
     * 产品属性的单位
     * {@link com.gxar.quick.ar.server.base.common.enums.order.OrderPropValueUnitEnum}
     */
    @Column(nullable = false)
    private String propValueUnit;

    /**
     * 开始时间
     */
    private Date startTime;
    /**
     * 结束时间
     */
    private Date endTime;

    /**
     * 产品的配置信息
     */
    private String configInfo;
    /**
     * 创建时间
     */
    @Column(nullable = false)
    private Date createdAt;
    /**
     * 创建者
     */
    @Column(nullable = false)
    private String creator;
    /**
     * 更新时间
     */
    @Column(nullable = false)
    private Date updatedAt;
    /**
     * 更新者
     */
    private String operator;
}
